﻿<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
      <Schema Namespace="Хранилище Stankovita_DBModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityType Name="Admins">
          <Key>
            <PropertyRef Name="ID_admin" />
          </Key>
          <Property Name="ID_admin" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="login" Type="nvarchar" MaxLength="40" Nullable="false" />
          <Property Name="pass" Type="nvarchar" MaxLength="40" Nullable="false" />
        </EntityType>
        <EntityType Name="Customers">
          <Key>
            <PropertyRef Name="ID_customer" />
          </Key>
          <Property Name="ID_customer" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="nameOrganiz" Type="nvarchar" MaxLength="80" Nullable="false" />
          <Property Name="login" Type="nvarchar" MaxLength="40" Nullable="false" />
          <Property Name="pass" Type="varchar" MaxLength="40" Nullable="false" />
          <Property Name="email" Type="nvarchar" MaxLength="60" Nullable="false" />
        </EntityType>
        <EntityType Name="Logs">
          <Key>
            <PropertyRef Name="ID_log" />
          </Key>
          <Property Name="ID_log" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="loginUser" Type="nvarchar" MaxLength="40" Nullable="false" />
          <Property Name="timeLogin" Type="datetime" Nullable="false" />
          <Property Name="timeLogout" Type="datetime" Nullable="false" />
          <Property Name="timeWork" Type="nvarchar" MaxLength="20" Nullable="false" />
        </EntityType>
        <EntityType Name="Manufactures">
          <Key>
            <PropertyRef Name="ID_machine" />
          </Key>
          <Property Name="ID_machine" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="nameMachine" Type="nvarchar" MaxLength="80" Nullable="false" />
          <Property Name="photo" Type="nvarchar" MaxLength="1000" />
          <Property Name="dateProd" Type="date" Nullable="false" />
          <Property Name="cost" Type="money" Nullable="false" />
          <Property Name="discount" Type="int" />
        </EntityType>
        <EntityType Name="Orders">
          <Key>
            <PropertyRef Name="ID_order" />
          </Key>
          <Property Name="ID_order" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="ID_machine" Type="int" Nullable="false" />
          <Property Name="ID_customer" Type="int" Nullable="false" />
          <Property Name="dateOrder" Type="date" Nullable="false" />
          <Property Name="amount" Type="int" Nullable="false" />
        </EntityType>
        <Association Name="FK1_Orders">
          <End Role="Manufactures" Type="Self.Manufactures" Multiplicity="1" />
          <End Role="Orders" Type="Self.Orders" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Manufactures">
              <PropertyRef Name="ID_machine" />
            </Principal>
            <Dependent Role="Orders">
              <PropertyRef Name="ID_machine" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK2_Orders">
          <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
          <End Role="Orders" Type="Self.Orders" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Customers">
              <PropertyRef Name="ID_customer" />
            </Principal>
            <Dependent Role="Orders">
              <PropertyRef Name="ID_customer" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Хранилище Stankovita_DBModelContainer">
          <EntitySet Name="Admins" EntityType="Self.Admins" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Customers" EntityType="Self.Customers" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Logs" EntityType="Self.Logs" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Manufactures" EntityType="Self.Manufactures" Schema="dbo" store:Type="Tables" />
          <EntitySet Name="Orders" EntityType="Self.Orders" Schema="dbo" store:Type="Tables" />
          <AssociationSet Name="FK1_Orders" Association="Self.FK1_Orders">
            <End Role="Manufactures" EntitySet="Manufactures" />
            <End Role="Orders" EntitySet="Orders" />
          </AssociationSet>
          <AssociationSet Name="FK2_Orders" Association="Self.FK2_Orders">
            <End Role="Customers" EntitySet="Customers" />
            <End Role="Orders" EntitySet="Orders" />
          </AssociationSet>
        </EntityContainer>
      </Schema>
    </edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="Stankovita_DBModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityType Name="Admins">
          <Key>
            <PropertyRef Name="ID_admin" />
          </Key>
          <Property Name="ID_admin" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="login" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="pass" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
        </EntityType>
        <EntityType Name="Customers">
          <Key>
            <PropertyRef Name="ID_customer" />
          </Key>
          <Property Name="ID_customer" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="nameOrganiz" Type="String" MaxLength="80" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="login" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="pass" Type="String" MaxLength="40" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Name="email" Type="String" MaxLength="60" FixedLength="false" Unicode="true" Nullable="false" />
          <NavigationProperty Name="Orders" Relationship="Self.FK2_Orders" FromRole="Customers" ToRole="Orders" />
        </EntityType>
        <EntityType Name="Logs">
          <Key>
            <PropertyRef Name="ID_log" />
          </Key>
          <Property Name="ID_log" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="loginUser" Type="String" MaxLength="40" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="timeLogin" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="timeLogout" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="timeWork" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
        </EntityType>
        <EntityType Name="Manufactures">
          <Key>
            <PropertyRef Name="ID_machine" />
          </Key>
          <Property Name="ID_machine" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="nameMachine" Type="String" MaxLength="80" FixedLength="false" Unicode="true" Nullable="false" />
          <Property Name="photo" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" />
          <Property Name="dateProd" Type="DateTime" Nullable="false" Precision="0" />
          <Property Name="cost" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
          <Property Name="discount" Type="Int32" />
          <NavigationProperty Name="Orders" Relationship="Self.FK1_Orders" FromRole="Manufactures" ToRole="Orders" />
        </EntityType>
        <EntityType Name="Orders">
          <Key>
            <PropertyRef Name="ID_order" />
          </Key>
          <Property Name="ID_order" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="ID_machine" Type="Int32" Nullable="false" />
          <Property Name="ID_customer" Type="Int32" Nullable="false" />
          <Property Name="dateOrder" Type="DateTime" Nullable="false" Precision="0" />
          <Property Name="amount" Type="Int32" Nullable="false" />
          <NavigationProperty Name="Customers" Relationship="Self.FK2_Orders" FromRole="Orders" ToRole="Customers" />
          <NavigationProperty Name="Manufactures" Relationship="Self.FK1_Orders" FromRole="Orders" ToRole="Manufactures" />
        </EntityType>
        <Association Name="FK2_Orders">
          <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
          <End Role="Orders" Type="Self.Orders" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Customers">
              <PropertyRef Name="ID_customer" />
            </Principal>
            <Dependent Role="Orders">
              <PropertyRef Name="ID_customer" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK1_Orders">
          <End Role="Manufactures" Type="Self.Manufactures" Multiplicity="1" />
          <End Role="Orders" Type="Self.Orders" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Manufactures">
              <PropertyRef Name="ID_machine" />
            </Principal>
            <Dependent Role="Orders">
              <PropertyRef Name="ID_machine" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
          <EntitySet Name="Admins" EntityType="Self.Admins" />
          <EntitySet Name="Customers" EntityType="Self.Customers" />
          <EntitySet Name="Logs" EntityType="Self.Logs" />
          <EntitySet Name="Manufactures" EntityType="Self.Manufactures" />
          <EntitySet Name="Orders" EntityType="Self.Orders" />
          <AssociationSet Name="FK2_Orders" Association="Self.FK2_Orders">
            <End Role="Customers" EntitySet="Customers" />
            <End Role="Orders" EntitySet="Orders" />
          </AssociationSet>
          <AssociationSet Name="FK1_Orders" Association="Self.FK1_Orders">
            <End Role="Manufactures" EntitySet="Manufactures" />
            <End Role="Orders" EntitySet="Orders" />
          </AssociationSet>
        </EntityContainer>
      </Schema>
    </edmx:ConceptualModels>
    <!-- C-S mapping content -->
    <edmx:Mappings>
      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
        <EntityContainerMapping StorageEntityContainer="Хранилище Stankovita_DBModelContainer" CdmEntityContainer="Entities">
          <EntitySetMapping Name="Admins">
            <EntityTypeMapping TypeName="Stankovita_DBModel.Admins">
              <MappingFragment StoreEntitySet="Admins">
                <ScalarProperty Name="ID_admin" ColumnName="ID_admin" />
                <ScalarProperty Name="login" ColumnName="login" />
                <ScalarProperty Name="pass" ColumnName="pass" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Customers">
            <EntityTypeMapping TypeName="Stankovita_DBModel.Customers">
              <MappingFragment StoreEntitySet="Customers">
                <ScalarProperty Name="ID_customer" ColumnName="ID_customer" />
                <ScalarProperty Name="nameOrganiz" ColumnName="nameOrganiz" />
                <ScalarProperty Name="login" ColumnName="login" />
                <ScalarProperty Name="pass" ColumnName="pass" />
                <ScalarProperty Name="email" ColumnName="email" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Logs">
            <EntityTypeMapping TypeName="Stankovita_DBModel.Logs">
              <MappingFragment StoreEntitySet="Logs">
                <ScalarProperty Name="ID_log" ColumnName="ID_log" />
                <ScalarProperty Name="loginUser" ColumnName="loginUser" />
                <ScalarProperty Name="timeLogin" ColumnName="timeLogin" />
                <ScalarProperty Name="timeLogout" ColumnName="timeLogout" />
                <ScalarProperty Name="timeWork" ColumnName="timeWork" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Manufactures">
            <EntityTypeMapping TypeName="Stankovita_DBModel.Manufactures">
              <MappingFragment StoreEntitySet="Manufactures">
                <ScalarProperty Name="ID_machine" ColumnName="ID_machine" />
                <ScalarProperty Name="nameMachine" ColumnName="nameMachine" />
                <ScalarProperty Name="photo" ColumnName="photo" />
                <ScalarProperty Name="dateProd" ColumnName="dateProd" />
                <ScalarProperty Name="cost" ColumnName="cost" />
                <ScalarProperty Name="discount" ColumnName="discount" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Orders">
            <EntityTypeMapping TypeName="Stankovita_DBModel.Orders">
              <MappingFragment StoreEntitySet="Orders">
                <ScalarProperty Name="ID_order" ColumnName="ID_order" />
                <ScalarProperty Name="ID_machine" ColumnName="ID_machine" />
                <ScalarProperty Name="ID_customer" ColumnName="ID_customer" />
                <ScalarProperty Name="dateOrder" ColumnName="dateOrder" />
                <ScalarProperty Name="amount" ColumnName="amount" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
        </EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
    <Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </Connection>
    <Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
        <DesignerProperty Name="EnablePluralization" Value="false" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
        <DesignerProperty Name="UseLegacyProvider" Value="false" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams></Diagrams>
  </Designer>
</edmx:Edmx>